import request from '@/static/js/popular.js'
const ProjectApi = {
	Demand: {
		/**
		 * 获取首页列表数据
		 */
		getListData: (params) => {
			return request.ajaxPost('/bus/wechat/item/getPage', params)
		},
		/**
		 * 获取首页红点数据 
		 */
		getRedData: () => {
			return request.ajaxPost('/bus/wechat/item/getPcRedInfo', {})
		},
		/**
		 * 提交需求
		 */
		SubmitDemand: (params = {}) => request.ajaxPost('/busItemDemand/confirm', params),
		/**
		 * 转工单
		 */
		ToOrder: (params = {}) => request.ajaxPost('/busItemProcess/demandReview/order', params),
		/**
		 * 分配需求
		 */
		Distribute: (params = {}) => request.ajaxPost('/busItemProcess/distribution', params),
		/**
		 * 获取详情
		 */
		GetDemandDetail: (itemCode) => request.ajaxPost('/busItemInfo/getWorkDetail', { itemCode }),
		/**
		 * 提交 初定级
		 */
		SubmitPreliminaryLevel: (params = {}) => request.ajaxPost('/busItemProcess/firstGrading', params),
		/**
		 * 提交需求分析 
		 */
		SubmitDemandAnalysis: (params = {}) => request.ajaxPost('/busitemdemandanalysis/submit', params),
		/**
		 * 提交技术分析 
		 */
		SubmitTechnicalAnalysis: (params = {}) => request.ajaxPost('/busitemtechnicalanalysis/submit', params),
		/**
		 * 提交需求评估 
		 */
		SubmitDemandAssess: (params = {}) => request.ajaxPost('/busItemProcess/demandAssess', params),
		/**
		 * 提交需求评审 
		 */
		SubmitDemandReview: (params = {}) => request.ajaxPost('/busItemProcess/demandReview', params),


		/**
		 * 提交投票
		 */
		SubmitVote: (voteId, result) => request.ajaxPost('/busVote/poll/demand', {
			voteId,
			result
		}),
		/**
		 * 获取投票数据
		 */
		GetVote: (itemCode) => request.ajaxPost('/busItemDemand/getReviewDetail', { itemCode }),
		/**
		 * 终止
		 */
		End: (params = {}) => request.ajaxPost('/busItemProcess/termination', params),
		/**
		 * 转工单
		 */
		ToOrder: (params = {}) => request.ajaxPost('/busItemProcess/demandReview/order', params),
	}
}

export default ProjectApi
